﻿using System;
using System.Collections.Generic;
using DLM.Domain.Model;
using DLM.Infrastructure.Domain;
using DLM.Domain.DTO;
using System.Linq.Expressions;

namespace DLM.Domain.Repositories
{
    public interface IPartyRepository : IRepository<Party, int>
    {
        IEnumerable<Party> FindByType(PartyType type);

        IEnumerable<Party> FindByType(PartyType type, int count);

        IEnumerable<Party> FindByType(PartyType type, PartyStatus status, int pageIndex, int pageSize);

        IEnumerable<Party> FindByStatus(PartyStatus status, int pageIndex, int pageSize);

        IEnumerable<Party> FindByStatus(PartyStatus status, string name, int pageIndex, int pageSize);

        IEnumerable<PartyDTO> FindMyEngaged(string name, int pageIndex, int pageSize);

        IEnumerable<PartyDTO> FindMyPublished(string name, int pageIndex, int pageSize);

        IEnumerable<PartyDTO> FindMyInteret(int[] typeArray, string accountName, int pageIndex, int pageSize);

        IEnumerable<Party> FindByPublisher(string name, int pageIndex, int pageSize);

        IEnumerable<PartyDTO> FindDTOByType(PartyType typ, PartyStatus status, int pageIndex, int pageSize);

        IEnumerable<PartyDTO> FindByLocation(string location, int pageIndex, int pageSize);

        IEnumerable<PartyDTO> FindByPartyDate(DateTime partyDate, int pageIndex, int pageSize);

        IEnumerable<PartyDTO> FindByCategory(int type, int pageIndex, int pageSize);

        IEnumerable<PartyDTO> FindAll(string location,DateTime partyDate,int type, int pageIndex, int pageSize);

        IEnumerable<PartyDTO> FindByOr(string location, DateTime partyDate, int type, int pageIndex, int pageSize);

        IEnumerable<PartyDTO> FindByLocationAndType(string location, int type, int pageIndex, int pageSize);

        IEnumerable<PartyDTO> FindByLocationAndDate(string location, DateTime partyDate, int pageIndex, int pageSize);

        IEnumerable<PartyDTO> FindByTypeAndDate(int type, DateTime partyDate, int pageIndex, int pageSize);

        PartyViewDTO FindViewDTO(int partyID);

        bool IsExist(int partyID);

        bool IsExist(string userName, int partyID);

        bool IsLead(string userName, int partyID);

        decimal SuccessRate(string accountName);

        IEnumerable<ParticipantProportion> FindParticipantProportion(int partyID);


        IEnumerable<AccountStatisticsDTO> Statistics();

        IEnumerable<PartyDTO> FindMyRecentParties(string name, int pageIndex, int pageSize);

        int[] LeadStatistics(string accountName);

        IEnumerable<Party> FindByDate(DateTime engagedDate,int userID);


    }
}
